@extends("public.main")
@section("content")
    <div style="margin-left:200px;">
        <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 分类管理 <span
                    class="c-gray en">&gt;</span>添加文章
        </nav>
        <form class="form form-horizontal form-o2o-add" id="form-o2o-add" method="post"
              action="/admin/article/add" enctype="multipart/form-data">
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>文章名称：</label>
                <div class="formControls col-xs-8 col-sm-5">
                    <input type="text" class="input-text" value="{{ old('title') }}" placeholder="" id="title"
                           name="title">
                    @if($errors->has('title'))
                        <a style="color:red">{{ $errors->first('title') }}</a>
                    @endif
                    {!!csrf_field()!!}
                </div>
            </div>
            <div class="row cl">
            </div>
            <div class="row cl">
                <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>文章内容：</label>
                <div class="formControls col-xs-8 col-sm-9">
                    <div style="width: 70%;">
                        <!-- 加载编辑器的容器 -->
                        <script id="container" name="content" type="text/plain">{{ old('content') }}</script>
                        <!-- 配置文件 -->
                        <script type="text/javascript"
                                src="{{ asset('/admin/article/ueditor/ueditor.config.js') }}"></script>
                        <!-- 编辑器源码文件 -->
                        <script type="text/javascript"
                                src="{{ asset('/admin/article/ueditor/ueditor.all.js') }}"></script>
                        <!-- 实例化编辑器 -->
                        <script type="text/javascript">
                            var ue = UE.getEditor('container');
                        </script>
                    </div>
                </div>
            </div>
            <div class="row cl"></div>


            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                    @if($errors->has('content'))
                        <a style="color:red">{{ $errors->first('content') }}</a>
                    @endif
                </div>
            </div>
            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                    <button type="submit" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe632;</i> 保存
                    </button>
                    <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                </div>
            </div>
        </form>
    </div>
    <script type="text/javascript">

    </script>
@endsection


